{% extends "base.html" %}
{% load static %}

{% block title %}Reset Your Password Now{% endblock %}


{% block extrahead %}
<link href="{% static 'css/main.css' %}" rel="stylesheet" type="text/css"/>
{% endblock %}

{% block navbar_items %}{% endblock %}

{% block page_title %}

{%  if validlink %}
Reset your password now
{% else %}
Unable to reset your password
{% endif %}

{% endblock %}

{% block page_body %}

{%  if validlink %}

<p>
Please reset your password according to the following instruction.
</p>

{% if form.errors %}
<p>password reset is invalid. Please try again.</p>
{% endif %}

<form method="post">
{% csrf_token %}

<table>
{% for field in form %}
    <tr>
        <td colspan="2">{{ field.errors }}</td>
    </tr>
    <tr>
        <td class="fieldKey">{{ field.label_tag }}</td>
        <td class="fieldValue">{{ field }}</td>
    </tr>
{% endfor %}
</table>

<p><input type="submit" value="Submit" id="submit"/></p>
<input type="hidden" name="next" value="{{ next }}"/>

{% else %}
<p>
The password reset link was invalid. It might be used or out of date.
Please request a <a href="{% url 'password_reset' %}?next={{ request.path }}">new password reset.</a>.
</p>

{% endif %}
{% endblock %}